package 
{
	/**
	 * ...
	 * @author
	 */

	 import laya.events.Event;
	 import ui.GamePlayUI;

	public class GamePlay extends GamePlayUI {
		public function GamePlay(){
			this.btn_pause.on(Event.MOUSE_DOWN, this, onPause);
			this.gamePause.visible = false;
		}

		private function onPause(): void {
			this.gamePause.visible = true;
			this.gamePause.once(Event.MOUSE_DOWN, this, onContinue);
			Laya.timer.scale = 0;
		}

		private function onContinue():void {
			this.gamePause.visible = false;
			Laya.timer.scale = 1;
		}

		public function update(hp:int, level:int, score:int):void {
			this.txt_hp.text = "HP:" + hp;
			this.txt_level.text = "Level:" + level;
			this.txt_score.text = "Score:" + score;
		}

	}

}